<template>
  <!-- center -->
  <view class="head" v-if="title == '彩中心'">
    <view style="font-size: 22px; margin-left: 165px; line-height: 70px">
      {{ title }}</view
    >
  </view>
  <!-- personal -->
  <view class="head" v-else-if="title == '个人信息'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 115px; line-height: 60px">{{
      title
    }}</view>
  </view>
  <!-- nickname -->
  <view class="head"  v-else-if="title == '昵称'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack1()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 135px; line-height: 60px">{{
      title
    }}</view>
    <view
      style="
        font-size: 22px;
        margin-left: 110px;
        line-height: 60px;
        color: orange;
      "
      @click="baochun"
      >保存</view
    >
  </view>
  <!-- take -->
  <view class="head" v-else-if="title == '收货地址'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack1()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 115px; line-height: 60px">{{
      title
    }}</view>
    <view
      style="font-size: 22px; margin-left: 85px; line-height: 60px; color: grey"
      @click="dizhiqued">确定</view
    >
  </view>
  <!-- order -->
  <view class="head" v-else-if="title == '我的订单'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack1()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 115px; line-height: 60px">{{
      title
    }}</view>
  </view>
  <!-- orderMsg -->
  <view class="head" v-else-if="title == '订单信息'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack2()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 115px; line-height: 60px">{{
      title
    }}</view>
  </view>
  <!-- evaluate -->
  <view class="head" v-else-if="title == '评价'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack2()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 140px; line-height: 60px">{{
      title
    }}</view>
    <view
      style="
        font-size: 22px;
        margin-left: 110px;
        line-height: 60px;
        color: orange;
      "
      >确定</view
    >
  </view>
  <!-- shop -->
  <view class="head" v-else-if="title == '我发布的商品'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack1()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 100px; line-height: 60px">{{
      title
    }}</view>
  </view>
  <!-- activity -->
  <view class="head" v-else-if="title == '我发布的活动'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack1()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 100px; line-height: 60px">{{
      title
    }}</view>
  </view>
  <!-- school -->
  <view class="head" v-else-if="title == '关于校园彩蛋'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack1()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 100px; line-height: 60px">{{
      title
    }}</view>
  </view>
  <!-- editActivity -->
  <view class="head" v-else-if="title == '编辑活动'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack3()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 120px; line-height: 60px">{{
      title
    }}</view>
    <view
      style="
        font-size: 22px;
        margin-left: 90px;
        line-height: 60px;
        color: orange;
      "
      @click="goBack3()"
      >发布</view
    >
  </view>
  <!-- realName -->
  <view class="head" v-else-if="title == '实名认证'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 120px; line-height: 60px">{{
      title
    }}</view>
    <view
      v-if="flag"
      style="
        font-size: 22px;
        margin-left: 90px;
        line-height: 60px;
        color: orange;
      "
      @click="tijiao"
      >提交</view
    >
    <view
      v-else
      style="font-size: 22px; margin-left: 90px; line-height: 60px; color: grey"
      >提交</view
    >
  </view>
  <!-- realdetile -->
  <view class="head" v-else-if="detail == '详情'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 120px; line-height: 60px">实名认证</view>
  </view>
  <!-- forgetPsd -->
  <view class="head" v-else-if="title == '忘记密码'" style="border-bottom: 0.5px solid rgb(238, 176, 60);">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 120px; line-height: 60px">{{ title }}</view>
  </view>
  <!-- newPsd -->
  <view class="head" v-else-if="title == '新密码'" style="border-bottom: 0.5px solid rgb(238, 176, 60);">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 125px; line-height: 60px">{{ title }}</view>
  </view>
<!--   
  <view class="head" v-else-if="title == '活动详情'">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 120px; line-height: 60px">{{
      title
    }}</view>
    <view
      style="
        font-size: 22px;
        margin-left: 90px;
        line-height: 60px;
        color: orange;
      "
      @click="baoming"
      >报名</view
    >
   
  </view> -->
  <!-- userArg -->
  <view class="head" v-else-if="title == '用户协议'" style="border-bottom: 0.5px solid rgb(238, 176, 60);">
    <view style="margin-top: 16px; margin-left: 10px" @click="goBack()"
      ><u-icon name="arrow-left" size="30px"></u-icon
    ></view>
    <view style="font-size: 22px; margin-left: 125px; line-height: 60px">{{ title }}</view>
  </view>
</template>

<script>
export default {
  props: ["title", "flag", "detail","dizhi"],
  name: "hea",
  data() {
    return {
      
    };
  },
  methods: {
    goBack() {
      uni.reLaunch({
        url: "/pages/center/center",
      });
    },
    goBack1() {
      uni.reLaunch({
        url: "/pages/center/center",
      });
    },
    // 订单信息
    goBack2() {
      uni.reLaunch({
        url: "/pages/center/order",
      });
    },
    // 昵称保存
    baochun() {
      uni.reLaunch({
        url: "/pages/center/personal",
      });
    },
    // 保存编辑活动
    goBack3() {
      uni.reLaunch({
        url: "/pages/center/activity",
      });
    },
    // 实名认证提交
    tijiao(){
      console.log('实名提交');
    },
    baoming(){
      console.log('报名');
    },
    // 地址确定
    dizhiqued(){
      console.log(this.dizhi);
    }
  },
};
</script>

<style scoped>
.head {
  width: 100%;
  height: 60px;
  background-color: white;
  display: flex;
}
</style>
